package com.songcha.library_business.api

import com.songcha.library_business.bean.banner.BannerBean
import com.songcha.library_business.bean.book.BookChapterCatalogBean
import com.songcha.library_business.bean.configuration.SystemConfigurationBean
import com.songcha.library_business.bean.configuration._SystemConfigurationDataBean
import com.songcha.library_business.bean.user.UserInfoBean
import com.songcha.library_network.bean.BaseBean
import io.reactivex.Observable
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

interface ApiService {

    @GET("/api/token/getUserInfoByToken")
    fun getUserInfo():Observable<UserInfoBean>

    @GET("/api/getSystemControl")
    fun getSystemConfiguration():Observable<SystemConfigurationBean>

    @GET("/api/getChapterByBookid/{bookId}")
    fun getBookChapterCatalog(@Path("bookId") bookId:Int):Observable<BookChapterCatalogBean>

    @GET("/api/getCarousel/{type}")
    fun getBanner(@Path("type") type:Int):Observable<BannerBean>

    @POST("/api/token/addBookshelf")
    fun addToBookShelf(@Body body:RequestBody):Observable<BaseBean>

    @POST("/api/token/delUserBookshelf")
    fun delBookShelf(@Body body:RequestBody):Observable<BaseBean>

    @GET("/api/token/updateClientIp")
    fun updateClientIp():Observable<BaseBean>

    //@GET("/api/getSystemControl")
    //fun getSystemConfiguration():Observable<SystemConfigurationBean>
}